<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>摇号结果 / {$lottery.house_addr}</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$context.field}" type="hidden" />
                        <input name="value" value="{$context.value}" type="hidden" />
                        <input name="page" value="{$context.page}" type="hidden" />
                        <input name="order_field" value="{$context.order_field}" type="hidden" />
                        <input name="order_sort" value="{$context.order_sort}" type="hidden" />
                        <input name="offset" value="{$context.offset}" type="hidden" />
                        <input name="id" value="{$context.id}" type="hidden" />
                    </form>
                </div>
            </div>
            <div class="line2">
                <!-- 编辑按钮组 -->
                <if condition="$lottery.state eq '待入住'">
                    <div class="fl form-btn-group btn-group-edit">
                        <in name="$x|default='01-04-05'" value="$rightsCode">
                            <button onclick="action_fenpeify();" class="btn-save btn-highlight">办理入住手续</button>
                            <else />
                            <button disabled="disabled" class="btn-save btn-disable">办理入住手续</button>
                        </in>
                        <span>或</span>
                        <a onclick="action_edit();" class="linkBtn btn-abort" href="javascript:void(0);">编辑</a>
                    </div>
                </if>
                <if condition="$lottery.state eq '已入住'">
                    <div class="fl form-btn-group btn-group-edit">
                        <if condition="$u.username eq 'admin'">
                            <button onclick="action_changefy();" class="btn-save btn-highlight">更换房源</button>
                            <else />
                            <button disabled="disabled" class="btn-save btn-disable">更换房源</button>
                        </if>
                        <span>或</span>
                        <a onclick="history.back(-1);" class="linkBtn btn-abort" href="javascript:void(0);">返回</a>
                    </div>
                </if>
                <!-- 保存按钮组 -->
                <div class="fl form-btn-group btn-group-save hidden">
                    <button onclick="action_save();" class="btn-save btn-highlight">保 存</button>
                    <span>或</span>
                    <a class="linkBtn btn-abort" onclick="action_abort();" href="javascript:void(0);">放弃</a>
                </div>
                <div class="fl form-btn-more">
                    <button class="btn-normal btn-more">
                        更多操作<i class="drop-down"></i>
                    </button>
                    <ul class="more-action hidden">
                        <in name="$x|default='01-04-04'" value="$rightsCode">
                            <li><a onclick="action_del2();" href="javascript:void(0);">删 除</a></li>
                            <li><a onclick="action_copy();" href="javascript:void(0);">复 制</a></li>
                        </in>
                        <in name="$x|default='01-04-08'" value="$rightsCode">
                            <li><a onclick="action_send();" href="javascript:void(0);">发送短信</a></li>
                        </in>
                        <in name="$x|default='01-04-04'" value="$rightsCode">
                            <if condition="$lottery.state eq '待入住'">
                                <li><a onclick="action_refuse();" href="javascript:void(0);">主动放弃摇号</a></li>
                            </if>
                        </in>
                    </ul>
                </div>
                <div class="fr form-search-count">
                    <span class="index">{$context.index}/{$page.total}</span>
                    <button onclick="ItemJump({$page.prev.id}, {$page.prev.offset});" class="btn-normal">上一条</button>
                    <button onclick="ItemJump({$page.next.id}, {$page.next.offset});" class="btn-normal">下一条</button>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="lotteryForm" method="post" action="">
                <!--表单相关原始信息存储-->
                <input type="hidden" name="old_no" value="{$lottery.no}" />
                <input type="hidden" name="old_name" value="{$lottery.name}" />
                <input type="hidden" name="old_seq" value="{$lottery.seq}" />
                <input type="hidden" name="old_batch_id" value="{$lottery.batch_id}" />
                <input type="hidden" name="old_idno" value="{$lottery.idno}" />
                <input type="hidden" name="old_phone" value="{$lottery.phone}" />
                <input type="hidden" name="old_house_addr" value="{$lottery.house_addr}" />
                <input type="hidden" name="old_state" value="{$lottery.state}" />
                <input type="hidden" name="old_remarks" value="{$lottery.remarks}" />
                <input type="hidden" name="old_contact_no" value="{$lottery.contact_no}" />
                <table class="form">
                    <tr>
                        <th width="15%">摇号批次<span class="hint">*</span></th>
                        <td width="35%" field="batch_id">{$batch[$lottery[batch_id]]}</td>
                        <th width="15%">序号<span class="hint">*</span></th>
                        <td field="seq">{$lottery.seq}</td>
                    </tr>
                    <tr>
                        <th>姓名<span class="hint">*</span></th>
                        <td field="name">{$lottery.name}</td>
                        <th>身份证<span class="hint">*</span></th>
                        <td field="idno">{$lottery.idno}</td>
                    </tr>
                    <tr>
                        <th>申请编号<span class="hint">*</span></th>
                        <td field="no">{$lottery.no}</td>
                        <th>房源地址<span class="hint">*</span></th>
                        <td field="house_addr">{$lottery.house_addr}</td>
                    </tr>
                    <tr>
                        <th>联系电话<span class="hint">*</span></th>
                        <td field="phone">{$lottery.phone}</td>
                        <th>合同编号</th>
                        <td field="contact_no">{$lottery.contact_no}</td>
                    </tr>
                    <tr>
                        <th>状态<span class="hint">*</span></th>
                        <td field="state">{$lottery.state}</td>
                        <th>备注</th>
                        <td field="remarks">{$lottery.remarks}</td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<include file="Public:reflottery_dialog" />
<include file="Public:changefy_dialog" />
<include file="Public:fenpeify_dialog" />
<include file="Public:sendMsg_dialog" />
<script>

    var options = {$options};
    var state_options = {$state_options};
    /**
     * 全局变量 fields
     */
    var fields = new Array("remarks");
</script>
<script src="__JS__/lottery.js" type="text/javascript" ></script>
<include file="Public:footer" />
